home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / ARexxTools / fpl70.lha / src / FPL.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-08  |  19.9 KB  |  539 lines

  1. #ifndef FPL_H
  2. #define FPL_H
  3. /*
  4. **   $Filename: libraries/FPL.h $
  5. **   $Release: 7.0 $
  6. **   $Date: 1994/03/18 19:08:51 $
  7. **
  8. **   (C) Copyright 1992, 1993 by FrexxWare
  9. **       All Rights Reserved
  10. */
  11.  
  12. /************************************************************************
  13.  *                                                                      *
  14.  * fpl.library - A run time library interpreting script langauge.       *
  15.  * Copyright (C) 1992, 1993 FrexxWare                                   *
  16.  * Author: Daniel Stenberg                                              *
  17.  *                                                                      *
  18.  * This program is free software; you can redistribute it and/or modify *
  19.  * it under the terms of the GNU General Public License as published by *
  20.  * the Free Software Foundation; either version 2, or (at your option)  *
  21.  * any later version.                                                   *
  22.  *                                                                      *
  23.  * This program is distributed in the hope that it will be useful,      *
  24.  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
  25.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
  26.  * GNU General Public License for more details.                         *
  27.  *                                                                      *
  28.  * You should have received a copy of the GNU General Public License    *
  29.  * along with this program; if not, write to the Free Software          *
  30.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.            *
  31.  *                                                                      *
  32.  * Daniel Stenberg                                                      *
  33.  * Birger Jarlsgatan 93b 3tr                                            *
  34.  * 113 56 Stockholm                                                     *
  35.  * Sweden                                                               *
  36.  *                                                                      *
  37.  * FidoNet 2:201/328      email: dast@sth.frontec.se                    *
  38.  *                                                                      *
  39.  ************************************************************************/
  40.  
  41. /*
  42.  *  OBSOLETE RETURN CODES! USE THE NEW 'FPLERR_*' ONES!!!
  43.  */
  44.  
  45. #ifndef OUTDATE_OLD
  46.  
  47. enum {
  48.   FPL_COULDNT_OPEN_DOS = 2,
  49.   FPL_DIVISION_BY_ZERO,
  50.   FPL_ILLEGAL_ANCHOR,
  51.   FPL_ILLEGAL_ARRAY,
  52.   FPL_ILLEGAL_ASSIGN,
  53.   FPL_ILLEGAL_BREAK,
  54.   FPL_ILLEGAL_CONDOP,
  55.   FPL_ILLEGAL_CONTINUE,
  56.   FPL_ILLEGAL_DECLARE,
  57.   FPL_ILLEGAL_PARAMETER,
  58.   FPL_ILLEGAL_PREOPERATION,
  59.   FPL_ILLEGAL_PROTOTYPE,
  60.   FPL_ILLEGAL_RESIZE,
  61.   FPL_ILLEGAL_STATEMENT,
  62.   FPL_ILLEGAL_VARIABLE,
  63.   FPL_INTERNAL_ERROR,
  64.   FPL_INSIDE_NOT_FOUND,
  65.   FPL_MISSING_APOSTROPHE,
  66.   FPL_MISSING_ARGUMENT,
  67.   FPL_MISSING_BRACE,
  68.   FPL_MISSING_BRACKET,
  69.   FPL_MISSING_OPERAND,
  70.   FPL_MISSING_PARENTHESES,
  71.   FPL_MISSING_SEMICOLON,
  72.   FPL_NO_ACTION,
  73.   FPL_OPEN_ERROR,
  74.   FPL_OUT_OF_MEMORY,
  75.   FPL_OUT_OF_REACH,
  76.   FPL_OUT_OF_STACK,
  77.   FPL_PROGRAM_STOPPED,
  78.   FPL_READONLY_VIOLATE,
  79.   FPL_SYNTAX_ERROR,
  80.   FPL_UNBALANCED_COMMENT,
  81.   FPL_UNEXPECTED_END,
  82.   FPL_UNMATCHED_BRACE,
  83.   FPL_IDENTIFIER_NOT_FOUND,
  84.   FPL_IDENTIFIER_USED,
  85.  
  86.   FPL_UNKNOWN_ERROR /* this or higher is unknown error codes! */
  87.  
  88. };
  89.  
  90. #endif
  91.  
  92. /***** ALL BY FPL SUPPLIED, IMPLEMENTED AND SUPPORTED RETURN CODES: ******/
  93. typedef enum {
  94.   FPL_OK,
  95.   FPL_EXIT_OK,         /* no error, the program stated simply exit() */
  96.   FPLERR_COULDNT_OPEN_DOS,
  97.   FPLERR_DIVISION_BY_ZERO,
  98.   FPLERR_ILLEGAL_ANCHOR,
  99.   FPLERR_ILLEGAL_ARRAY,
  100.   FPLERR_ILLEGAL_ASSIGN,
  101.   FPLERR_ILLEGAL_BREAK,
  102.   FPLERR_ILLEGAL_CONDOP,
  103.   FPLERR_ILLEGAL_CONTINUE,
  104.   FPLERR_ILLEGAL_DECLARE,
  105.   FPLERR_ILLEGAL_PARAMETER,
  106.   FPLERR_ILLEGAL_PREOPERATION,
  107.   FPLERR_ILLEGAL_PROTOTYPE,
  108.   FPLERR_ILLEGAL_RESIZE,
  109.   FPLERR_ILLEGAL_STATEMENT,
  110.   FPLERR_ILLEGAL_VARIABLE,
  111.   FPLERR_INTERNAL_ERROR,
  112.   FPLERR_INSIDE_NOT_FOUND,
  113.   FPLERR_MISSING_APOSTROPHE,
  114.   FPLERR_MISSING_ARGUMENT,
  115.   FPLERR_MISSING_BRACE,
  116.   FPLERR_MISSING_BRACKET,
  117.   FPLERR_MISSING_OPERAND,
  118.   FPLERR_MISSING_PARENTHESES,
  119.   FPLERR_MISSING_SEMICOLON,
  120.   FPLERR_NO_ACTION,
  121.   FPLERR_OPEN_ERROR,
  122.   FPLERR_OUT_OF_MEMORY,
  123.   FPLERR_OUT_OF_REACH,
  124.   FPLERR_OUT_OF_STACK,
  125.   FPLERR_PROGRAM_STOPPED,
  126.   FPLERR_READONLY_VIOLATE,
  127.   FPLERR_SYNTAX_ERROR,
  128.   FPLERR_UNBALANCED_COMMENT,
  129.   FPLERR_UNEXPECTED_END,
  130.   FPLERR_UNMATCHED_BRACE,
  131.   FPLERR_IDENTIFIER_NOT_FOUND,
  132.   FPLERR_IDENTIFIER_USED,
  133.  
  134.   FPLERR_MISSING_COLON, /* new from version 7 */
  135.   FPLERR_MISSING_WHILE, /* new from version 7 */
  136.  
  137.   FPLERR_UNKNOWN_ERROR /* this or higher is unknown error codes! */
  138.  
  139.   } ReturnCode;
  140.  
  141. /*********************************************************************
  142.  *
  143.  * Argument defines:
  144.  *
  145.  */
  146.   
  147. #define FPL_STRARG        'S'
  148. #define FPL_INTARG        'I'
  149. #define FPL_OPTARG      'O'
  150. #define FPL_STRARG_OPT    (FPL_STRARG^32)
  151. #define FPL_INTARG_OPT    (FPL_INTARG^32)
  152. #define FPL_OPTARG_OPT    (FPL_OPTARG^32)
  153. #define FPL_ARGLIST       '>'
  154.  
  155. /*********************************************************************
  156.  * fplInit() and fplReset() tags:
  157.  ********************************************************************/
  158.  
  159. #define FPLTAG_END            0
  160. #define FPLTAG_DONE           0
  161. #define FPLSEND_DONE          0
  162. #define FPLSEND_END          0
  163. /* End of tag list defines! */
  164.  
  165. #define FPLTAG_INTERVAL       1 /* data is a function pointer */
  166. /* Define the interval function pointer! */
  167.  
  168. #define FPLTAG_ZERO_TERMINATE 2 /* obsolete tag from version 5*/
  169.  
  170. #define FPLTAG_STACK          3 /* data is size in bytes */
  171. /* Important only for the Amiga library version! Default startup size of the
  172.    library stack. */
  173.  
  174. #define FPLTAG_USERDATA       4 /* data is free to use to anything! */
  175. /* Userdata able to read anywhere with GetUserdata(): */
  176.  
  177. #define FPLTAG_FUNCDATA       FPLTAG_USERDATA /* data is free to use */
  178. /* Specifies private data to a specific function. */
  179.  
  180. #define FPLTAG_FUNCTION       5 /* data is a function pointer */
  181. /* fplAddFunction() tag only. function handler routine for this function. */
  182.  
  183. #define FPLTAG_MAXSTACK          6 /* data is size in bytes */
  184. /* (Amiga) Max stack allocation left when a single FPL execution is done. */
  185.  
  186. #define FPLTAG_STACKLIMIT     7 /* data is size in bytes */
  187. /* (Amiga) Absolute maximum memory area used as stack by one single FPL
  188.    program. */
  189.  
  190. /* removed obsolete tag `FPLTAG_FREE' ! */
  191.  
  192. #define FPLTAG_INTERNAL_ALLOC 9 /* data is function pointer */
  193. /* To a "void *(*)(long)" (on Amiga, the parameter will be sent in d0
  194.    and *not* on the stack)! */
  195. #define FPLTAG_INTERNAL_DEALLOC 10 /* data is function pointer */
  196. /* To a "void (*)(void *, long);" (on Amiga, the parameters will be sent in
  197.    the registers a1 and d0 and *NOT* on the stack as all other functions do. */
  198.  
  199. #define FPLTAG_INTERPRET 11 /* data is a char pointer */
  200. /* To a fully FPL syntax statement to be interpreted instead of the
  201.    actual main function of the program that is about to get started. */
  202.  
  203. #define FPLTAG_STARTPOINT 12 /* data is a char pointer */
  204. /* To the alternative start position of this program. */
  205. #define FPLTAG_STARTLINE  13 /* data is integer */
  206. /* The line of the upper start point if not 1. */
  207.  
  208. #define FPLTAG_STOREGLOBALS 14 /* data is boolean */
  209. /* This enables/disables the FPL global symbol storage ability. */
  210.  
  211. #define FPLTAG_CACHEALLFILES 15 /* data is one of the defines below */
  212. /* Should FPL cache all files exporting functions? */
  213.  
  214. #define FPLTAG_CACHEFILE 16 /* data is one of the defines below */
  215. /* Should FPL cache this file. Default is FPLTAG_CACHEALLFILES or false. */
  216.  
  217. #define FPLCACHE_NONE    0 /* never cache */
  218. #define FPLCACHE_ALWAYS  1 /* always cache */
  219. #define FPLCACHE_EXPORTS 2 /* cache if symbols were exported */
  220.  
  221. #define FPLTAG_FILEID 17 /* data is a unique file identification 32-bit */
  222. /* This fileID is used by FPL. Associate this program with this fileID!
  223.    If you ever make a FPLSEND_FLUSHCACHEDFILES and this file is removed from
  224.    memory, FPL will use this when requesting the file from you!
  225.    If this file doesn't declare any `export' functions, if you never flushes
  226.    this file or if you don't allow saved export variables, this tag can be
  227.    ignored (FPL will then create a temporary fileID to use). */
  228.  
  229. #define FPLTAG_PROGNAME 18 /* data is char pointer to zero terminated name */
  230. /* When using fplExecuteScript(), FPL does not have a name for the program.
  231.    If you want anything but <unknown program> in a possible error report,
  232.    you should use this. fplEXecuteFile() automatically sets this tag, but
  233.    if you don't want the program to be named as the file name, use this tag
  234.    then too! */
  235.  
  236. #define FPLTAG_FILEGLOBALS 19 /* data is pointer to long */
  237. #define FPLTAG_ISCACHED FPLTAG_FILEGLOBALS
  238. /* Supply this tag with a pointer to a `long' and receive a zero (0) if no
  239.    global symbols was declared, or a non-zero (_not_ the number of symbols)
  240.    value if any global symbols were declared.
  241.  
  242.    If this leaves a non-zero value, it means that FPL has stored symbols
  243.    associated with this program's ID. If you do not want them, use the
  244.    {FPLSEND_FREEFILE, filename} tag to clean up. If you want to be able
  245.    to start the same program using the old global symbol values (and not
  246.    confusing the interpreter), use the same file name on next start.
  247.    */
  248.  
  249. #define FPLTAG_FILENAMEGET 20 /* data is boolean */
  250. /* This tag tells FPL that the program name is ok to use as file name to load
  251.    the program from after a flush. fplExecuteFile() uses this tag as default.
  252.    */
  253.  
  254. #define FPLTAG_MINSTACK 21 /* data is long */
  255. /* (Amiga) This tag is used in fplInit() or fplReset() and informs FPL about
  256.    the smallest acceptable stack size that you want when the interface
  257.    function is called. */
  258.  
  259. #define FPLTAG_LOCKUSED 22 /* data is boolean */
  260. /* (Amiga) This tag makes FPL to Lock() on the file currently executed with
  261.    fplExecuteFile() or a program exeuted with that function that declared
  262.    global data. */
  263.  
  264. /**** NEW FROM VERSION 5: ****/
  265.  
  266. #define FPLTAG_HASH_TABLE_SIZE 23 /* data is a long */
  267. /* This sets the hash table size. USE ONLY IN fplInit()!!! */
  268.  
  269. #define FPLTAG_NEWLINE_HOOK 24 /* data is a standard long (*)(void *); */
  270. /* Called after every newline character read. The argument is sent in register
  271.    A0 in the Amiga version. The argument is so far only the fplinit() return
  272.    code. This might be subject to change to next release!! If you intend to
  273.    use this, use caution! */
  274.  
  275. /**** NEW FROM VERSION 5.3: ****/
  276. #define FPLTAG_ALLFUNCTIONS 25 /* data is boolean */
  277. /* Enables the FPL_UNKNOWN_FUNCTION interface message. Whenever FPL finds a
  278.    function not recognized, it will still parse all arguments and call the
  279.    interface function. */
  280.  
  281. /**** NEW FROM VERSION 6: ****/
  282.  
  283. #define FPLTAG_STRING_RETURN 27 /* data is pointer to a char pointer */
  284. /* enables the top level FPL program to return a string to the calling
  285.    program in the pointer the data supplies a pointer to. NULL disables
  286.    the ability. The string should be freed using the brand new function
  287.    fplFreeString() */
  288.  
  289. /**** NEW FROM VERSION >6: ****/
  290. #define FPLTAG_NESTED_COMMENTS 28 /* data is boolean */
  291. /* This fplInit() tag makes FPL allow nested comments. Default is off. */
  292.  
  293. /**** NEW FROM VERSION 8 (expected anyway): ****/
  294. #define FPLTAG_COMPILE 26
  295.  
  296. #define DUMMY    100      /* ignore this */
  297.  
  298. /**********************************************************************
  299.  * Here follows the tags for the fplSend() function. New for V3.
  300.  *********************************************************************/
  301.  
  302. #define FPLSEND_STRING    (DUMMY +1)
  303. /* Use this when returning a string from a user function. See FPLSEND_STRLEN */
  304.  
  305. #define FPLSEND_STRLEN  (DUMMY +2)
  306. /* Specifies the length of the returned string. If this is -1, a strlen()
  307.    will be performed by FPL to find out the real length! */
  308.  
  309. #define FPLSEND_INT    (DUMMY +3)
  310. /* You return an integer from the function. */
  311.  
  312. #define FPLSEND_GETRESULT (DUMMY +4)
  313. /* You specify a pointer to a `long' to hold the result of the last interval
  314.    function call. */
  315.  
  316. #define FPLSEND_GETLINE (DUMMY +5)
  317. /* You specify a pointer to a `long' to hold the number of the current line the
  318.    interpreter is working on. */
  319.  
  320. #define FPLSEND_GETRETURNCODE (DUMMY +6)
  321. /* You specify a pointer to a `long'  to hold the value received by the last
  322.    return() or exit() call in the FPL program. */
  323.  
  324. #define FPLSEND_GETUSERDATA (DUMMY +7)
  325. /* You specify a pointer to a `long'  to hold the userdata specified in the
  326.    `FPLTAG_USERDATA' tag's data field in the fplInit() call. */
  327.  
  328. #define FPLSEND_GETCOLUMN (DUMMY +8)
  329. /* You specify a pointer to a `long'  to hold the number of the current column
  330.    the interpreter is working on. */
  331.  
  332. #define FPLSEND_FLUSHCACHE (DUMMY +9)
  333. /* specify TRUE/FALSE wheather you want FPL to flush (empty) the internal
  334.    memory cache/queue. */
  335.  
  336. #define FPLSEND_FREEFILE (DUMMY +10) /* data is a program name pointer */
  337. /* FPL frees all functions associated with the given program! */
  338.  
  339. #define FPLSEND_PROGRAMFILE FPLSEND_STRING
  340. /* Used when returning a program's file name to FPL. */
  341.  
  342. #define FPLSEND_PROGRAM (DUMMY +11) /* data is pointer to an array */
  343. /* When using functions in different source files, this is one way to give
  344.    FPL information about where to find a certain function! */
  345.  
  346. #define FPLSEND_GETPROGNAME (DUMMY +12)
  347. /* Get pointer to the last interpretated FPL program name. If any error has
  348.    occurred, this will be the failing program name! */
  349.  
  350. #define FPLSEND_CONFIRM (DUMMY +13)
  351. /* Used to confirm the query from FPL. Currently, taht can only be
  352.    FPL_FLUSH_FILE. */
  353.  
  354. #define FPLSEND_FLUSHFILE (DUMMY +14)
  355. /* Flush the file with the specified fileID. If no ID is specified, all unused
  356.    files will be flushed. */
  357.  
  358. #define FPLSEND_STEP (DUMMY +15)
  359. /* Moves the current interpret position. Negative number is backwards and
  360.    positive forwards. */
  361.  
  362. #define FPLSEND_GETSTACKSIZE (DUMMY + 16) /* data is pointer to long */
  363. /* (Amiga) Receive the current stack size! */
  364.  
  365. #define FPLSEND_GETSTACKUSED (DUMMY + 17) /* data is pointer to long */
  366. /* (Amiga) Receive the current amount of stack used (this isn't an exact
  367.    figure) */
  368.  
  369. #define FPLSEND_SETPROGNAME (DUMMY + 18) /* data is char pointer */
  370. /* This tag forces a new name to the current (executing) program.
  371.    See also FPLTAG_PROGNAME */
  372.  
  373. #define FPLSEND_SETFILENAMEGET (DUMMY + 19) /* data is boolean */
  374. /* This tag sets or clears the same FPLTAG_FILENAMEGET option */
  375.  
  376. /**** NEW FOR VERSION 4: ****/
  377.  
  378. #define FPLSEND_GETSYMBOL_FUNCTIONS    (DUMMY + 20)
  379. #define FPLSEND_GETSYMBOL_MYFUNCTIONS    (DUMMY + 21)
  380. #define FPLSEND_GETSYMBOL_FPLFUNCTIONS    (DUMMY + 22)
  381. #define FPLSEND_GETSYMBOL_VARIABLES    (DUMMY + 23)
  382. #define FPLSEND_GETSYMBOL_CACHEDFILES    (DUMMY + 24)
  383. #define FPLSEND_GETSYMBOL_FREE        (DUMMY + 25)
  384. /* See FPL.guide for information and docs */
  385.  
  386. /**** NEW FOR VERSION 5: ****/
  387.  
  388. #define FPLSEND_GETPROG (DUMMY + 26)
  389. /* Supply a pointer to a char pointer, and you'll get a pointer to the current
  390.    program. */
  391.  
  392. #define FPLSEND_GETINTERVAL (DUMMY + 27)
  393. /* Supply a pointer to a function pointer, and you'll receive a pointer to the
  394.    specified interval function. */
  395.  
  396. #define FPLSEND_GETNEWLINE_HOOK (DUMMY + 28)
  397. /* Supply a pointer to a function pointer, and you'll receive a pointer to the
  398.    specified newline hook. */
  399.  
  400. #define FPLSEND_GETFUNCTION (DUMMY + 29)
  401. /* Supply a pointer to a function pointer, and you'll receive a pointer to the
  402.    specified interface function. */
  403.  
  404. #define FPLSEND_GETSYMBOL_ALLVARIABLES (DUMMY + 30)
  405. #define FPLSEND_GETSYMBOL_ALLFUNCTIONS (DUMMY + 31)
  406. /* See FPL.guide for information */
  407.  
  408. /**** NEW FOR VERSION 5.3: ****/
  409. #define FPLSEND_GETVIRLINE (DUMMY + 32)
  410. /* return the virtual line number in the long you send a pointer to!
  411.    NOTE: The virtual line number is most often the "real" line number of your
  412.    program. FPL counts every appearance of \x0a in the program and that makes
  413.    the VIRTUAL line number since that has nothing to do with how FPL really
  414.    counts the lines!
  415.    Future versions will be able to change this line number run-time, using the
  416.    #line - instruction!
  417.    */
  418.  
  419. #define FPLSEND_GETVIRFILE (DUMMY + 33)
  420. /* return the virtual filename in the char pointer you send a pointer to!
  421.    NOTE: The virtual file name is most often the name of the current
  422.    executed program. 
  423.    Future versions will be able to change this line number run-time, using the
  424.    #line - instruction!
  425.    */
  426.  
  427. /**** NEW FOR VERSION 6: ****/
  428. #define FPLSEND_DONTCOPY_STRING (DUMMY + 34)
  429. /* The string we send to FPL is allocated with fplAllocString(). */
  430.  
  431.  
  432.  /***********************************************************************
  433.   *
  434.   * Funclib defines (new from version 7) [Amiga only]
  435.   *
  436.   *****/
  437.  
  438. #define FPLLIB_NONE  0 /* nothing at all! */
  439. #define FPLLIB_FORCE (1<<0)
  440. #define FPLLIB_KEEP  (1<<1)
  441.  
  442. struct fplArgument {
  443.   /*
  444.    * Interface function argument structure...
  445.    */
  446.  
  447.   char *name;        /* Name */
  448.   long ID;              /* ID */
  449.   void **argv;          /* Pointer array of all arguments in the same order as
  450.                they were read. Integers are simply stored in the
  451.                pointer (read docs for info about this). */
  452.   long argc;            /* Number of members in the array above */
  453.   void *key;        /* The return code from your initial fplInit() call! */
  454.   char *format;        /* Pointer to the actual format string of this
  455.                function. Functions using '>' in their format
  456.                string can get quite a long string here... */
  457.   void *funcdata;    /* The same data as passed in the FPLTAG_FUNCDATA tag
  458.                of your AddFunction() call. Your possibility to
  459.                pass function specific data through the library. */
  460.   /* NEW FOR FPL 5.10 */
  461.   char ret;        /* Expected return type. Especially usefull when
  462.                using functions with optional return types. */
  463. };
  464.  
  465. struct fplSymbol {
  466.   /*
  467.    * Using the functions FPLSEND_GETSYMBOL_XXXXXXX will result in a pointer
  468.    * to a structure like this!
  469.    *
  470.    * Free that pointer by FPLSEND_GETSYMBOL_FREE.
  471.    */
  472.   long num;
  473.   char **array;
  474. };
  475.  
  476. /****************************/
  477. /***** STRING LENGTH: *******/
  478. /****************************/
  479. /* Since the no-zero-terminated-strings theories was introduced, we can't
  480.    use a simple strlen() to get the string length. This macro will do the
  481.    job for you. (Extensively typecasted to apply to ANSI standard.)
  482.    Supply the name of the structure pointer you received in the interface
  483.    function, and the number of the string. Returns the length of that
  484.    string. */
  485. #define FPL_STRING_LENGTH(arg, n)\
  486.   ((long)*(long *)((char *)(arg)->argv[n]-sizeof(long)))
  487.  
  488. /* Supply a string pointer received in the interface function. Returns
  489.    the length of the FPL-string! */
  490. #define FPL_STRLEN(arg)\
  491.   ((long)*(long *)((char *)(arg)-sizeof(long)))
  492.  
  493. /****************************/
  494. /***** FPLARGUMENT.ID: ******/
  495. /****************************/
  496. #define FPL_GENERAL_ERROR -1
  497. /* There was an error in the interpreting.
  498.    arg->argv[0] contains the error number.
  499.    */
  500.  
  501. #define FPL_FILE_REQUEST  -2
  502. /* FPL wants a file from you that was previously flushed! The arg->argv[0]
  503.    contains the fileID of the program. Use FPLSEND_PROGRAM or
  504.    FPLSEND_PROGFILE to respond. */
  505.  
  506. #define FPL_FLUSH_FILE -3
  507. /* FPL allows you to remove the allocation associated with a certain program.
  508.    The arg->argv[0] contains the fileID. Respond with FPLSEND_CONFIRM and the
  509.    data field TRUE if you really do want to flush that program. */
  510.  
  511. #define FPL_WARNING -4
  512. /* FPL warning. ->argv[0] holds the error number. Return a fplSend() with
  513.    {FPLSEND_CONFIRM, TRUE} if you want FPL to try to continue anyway! */
  514.  
  515. #define FPL_HIJACK_READ -5
  516. /* The program accessed a variable that previously has been hijacked!
  517.    This is currently not implemented, but are tested in the laboratories! */
  518.  
  519. #define FPL_UNKNOWN_FUNCTION -6 /* New from version 5.3 */
  520. /* The program has interpreted an unknown function identifier. The name
  521.    is found in the ->name member, and the parameters are read as usual via
  522.    the ->format member from the ->argc and ->argv members. ->funcdata are
  523.    reserved for future use, do not depend upon it to hold anything
  524.    particular. This is activated with FPLTAG_ALLFUNCTIONS. */
  525.  
  526. #define FPL_COMPILE -7 /* development ID */
  527.  
  528. /****************************/
  529. /****** Limitations: ********/
  530. /****************************/
  531. /* Max length of a resulting error message: */
  532. #define FPL_ERRORMSG_LENGTH 100
  533.  
  534. #define FPLNAME "fpl.library"
  535.  
  536. #define FPL_VERSION  7
  537. #define FPL_REVISION 0
  538. #endif
  539.